package com.cm.api.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @类 名：MybatisPlusConfig </br>
 * @描 述：</br>
 * @日 期：2020/9/2 15:30</br>
 * @作 者：常明</br>
 * @版 本：1.0.0
 * @since JDK 1.8
 */
@EnableTransactionManagement
@Configuration
@MapperScan("com.cm.api.mapper")
public class MybatisPlusConfig {
    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
